﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="com.burry.util.MapList" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Bary</title>

<script src="Resource/js/wsGridCtrl.js"></script>
<link rel="stylesheet" type="text/css" id="css" href="Resource/css/main.css">
<body>
	<div id="framed">
  	<h2>分类管理</h2>
  </div>
  
  <div>


<script language="javascript">
	
function addCata(uid){
	location.href = "addCataInit.do?id="+uid;
}

function updateCata(uid){
	location.href = "updateCataInit.do?id="+uid;
}

function deleteCata(uid){
	location.href = "deleteCata.do?id="+uid;
}

function bindAd(uid){
	location.href = "cataAdInit.do?id="+uid;
}
<%

//HttpServletRequest sRequest = ServletActionContext.getRequest();
MapList cataMap = (MapList)request.getAttribute("cataList");
StringBuffer sb = new StringBuffer();
sb.append("var m_wsGridCtrl = new wsGridCtrl();");
sb.append("m_wsGridCtrl.initializeDocument(800, \"#FF9999\");");

sb.append("m_wsGridCtrl.InsTab(\"分类编号\", \"*\");");
sb.append("m_wsGridCtrl.InsTab(\"分类名称\", \"300\");");
sb.append("m_wsGridCtrl.InsTab(\"操作\", \"300\");");

sb.append((String)request.getAttribute("treeStr"));

sb.append("m_wsGridCtrl.GenerateCode();	");

sb.append("m_wsGridCtrl.RecudeAllTree();");

out.print(sb.toString());
%>

</script>

<br />

<input type="button" onclick="addCata('-1')" value="增加父类" />
  </div>
</body>
</html>